<div class="org-view">

  <div class="content">
    <div class="row">
      <div class="list-toolbar col-xl-12">
        <div class="title">
          <span>{{org.name}}</span>
        </div>

        <div class="filter">

        </div>

        <div class="buttons">

        </div>
      </div>
    </div>

    <div class="row chart">
      <div class="col-sm-6">
        <design-progress [data]="testChartData.design" [showTitle]="true"></design-progress>
      </div>
      <div class="col-sm-6">
        <execution-process [data]="testChartData.exe" [showTitle]="true"></execution-process>
      </div>
    </div>

    <div class="row chart">
      <div class="col-sm-6">
        <issue-trend [data]="issueChartData.trend" [title]="'问题趋势'"></issue-trend>
      </div>
      <div class="col-sm-6">
        <issue-age [data]="issueChartData.age" [title]="'问题龄期'"></issue-age>
      </div>
      <div class="col-sm-6">
        <issue-distrib [data]="issueChartData.distribByPriority" [title]="'问题优先级分布'"></issue-distrib>
      </div>
      <div class="col-sm-6">
        <issue-distrib [data]="issueChartData.distribByStatus" [title]="'问题状态分布'"></issue-distrib>
      </div>
    </div>
  </div>

  <div class="info">

    <div class="activity">
      <div class="title">
        执行计划
      </div>
      <div class="list">
        <table class="table">
          <thead>
          <tr>
            <th>名称</th>
            <th>时间</th>
            <th>状态</th>
            <th>操作</th>
          </tr>
          </thead>

          <tbody>
          <tr *ngFor="let plan of plans; let i = index;">
            <td>{{plan.name}}</td>
            <td>{{plan.startTime | date:'y/MM/dd'}} - {{plan.endTime | date:'y/MM/dd'}}</td>
            <td>{{plan.status | exeStatus}}</td>
            <td>
                      <span prj-privilege [privs]="'test_plan:view'"
                            [routerLink]="['/pages/org/' + id + '/prj/' + plan.projectId + '/implement/plan/' + plan.id + '/view']" class="link no-underline">查看</span>
            </td>
          </tr>
          </tbody>
        </table>
      </div>
    </div>

    <div class="activity">
      <div class="title">
        项目活动
      </div>
      <div class="list">
        <div *ngFor="let item of (histories | mapToArray); let i = index;" class="item">
          <div class="date">
            {{item.key}}
          </div>
          <div class="descr">
            <div class="action-html descr-item" *ngFor="let his of item.value; let j = index;">
              <div class="content"><span [innerHTML]="his.title"></span></div>
              <div class="date">{{his.createTime | date:'HH:mm:ss'}}</div>
            </div>
          </div>
        </div>

      </div>
    </div>

  </div>
</div>
